package com.software.creatot;

public class MealBuilder {

    public Meal prepareVegMeal() {
        Meal meal = new Meal();
        Item itemBurger = new VegBurger();
        Item itemDrink = new Peisi();
        meal.addItem(itemBurger);
        meal.addItem(itemDrink);
        meal.showItem();
        System.out.print("总价格是" + meal.getCost());
        return meal;
    }

    public Meal prepareNonVegMeal() {
        Meal meal = new Meal();
        Item itemBurger = new ChickenBurger();
        Item itemDrink = new CoCo();
        meal.addItem(itemBurger);
        meal.addItem(itemDrink);
        meal.showItem();
        System.out.print("总价格是" + meal.getCost());
        return meal;
    }

}
